<?php

namespace App\Http\Controllers;

use App\Http\Controllers\BaseController;
use App\Services\BranchService;
use Illuminate\Http\Request;

class BranchController extends BaseController
{
    public function __construct(BranchService $branchService)
    {
        $this->branchService = $branchService;
    }

    public function index()
    {
        $data = $this->branchService->getAll();

        return $this->response->success($data);
    }

    public function show(Request $request)
    {
        $id = $request->input('id');
        $result = $this->branchService->getInfo($id);

        return $this->response->success($result);
    }

}
